﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>
<div class="full-width">
    <table id="Vertices_Grid"></table>
    <div id="Vertices_Pager"></div>
</div>

<script type="text/javascript">
    (function() {
        jQuery("#Vertices_Grid").jqGrid({
            url: "@Url.Action("List")",
            //width: "100%",
            //autoWidth:true,
            datatype: "json",
            colNames: ['Id', 'Title', "","",""],
            colModel: [
                { name: 'Id', index: 'Id' },
                { name: 'Title', index: 'Title' },
                { name: 'Position_X', index: 'Position_X' },
                { name: 'Title', index: 'Title' },
                { name: 'Title', index: 'Title' },
                
            ],
            rowNum: 10,
            rowList: [10, 20, 30],
            pager: '#Vertices_Pager',
            sortname: 'id',
            //viewrecords: true,
            sortorder: "desc",
            caption: "JSON Example"
        });
        jQuery("#Vertices_Grid").jqGrid('navGrid', '#Vertices_Pager',
            { edit: true, add: true, del: true }, { }, { url: "@Url.Action("Detail", new {id=0})" });
    })();
</script>